package com.hjf.booking.module.user.mapper;

import com.hjf.booking.module.user.po.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.BaseMapper;

/**
 * @author hjf
 * @date 2021-03-17 15:43
 */
public interface UserMapper extends BaseMapper<User> {

    @Select("select *from user where username = #{username}")
    User selectByName(@Param("username") String username);

    @Update("update user set salt = #{salt} where username = #{username}")
    Integer refreshSalt(@Param("username") String username, @Param("salt") String salt);
}
